<?php
namespace pinduoduo\Request;

use pinduoduo\AbstractInterface\Request;

class PddDdkUrlShortParseRequest extends Request
{
    /**
     * 多多进宝推广短链解析
     * @var string
     */
    private $type = 'pdd.ddk.url.short.parse';

    /**
     * 需要解析出长链的多多进宝短连接，仅支持短链接（即为pdd.ddk.goods.promotion.url.generate接口生成的短链）
     * @var
     */
    private $originalUrl;

    public function setType($type)
    {
        $this->type = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    public function setOriginalUrl($originalUrl)
    {
        $this->originalUrl = $originalUrl;
    }

    public function getOriginalUrl()
    {
        return $this->originalUrl;
    }

    public function getParams()
    {
        $params = [
            'type'         => $this->type,
            'original_url' => $this->originalUrl,
        ];
        return array_filter($params);
    }
}
